package com.yunke.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 管理员账户实体类
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("yunke_admin")
@Schema(name = "YunkeAdmin", description = "管理员账户实体")
public class YunkeAdmin implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "管理员ID")
    private Long id;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "管理员昵称")
    private String nickname;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "手机号")
    private String mobile;

    @Schema(description = "角色ID列表（逗号分隔）")
    private String roleIds;

    @Schema(description = "部门ID")
    private Long departmentId;

    @Schema(description = "部门名称")
    private String departmentName;

    @Schema(description = "职位")
    private String position;

    @Schema(description = "权限列表（逗号分隔）")
    private String permissions;

    @Schema(description = "账户状态（0正常 1禁用 2锁定）")
    private Integer accountStatus;

    @Schema(description = "是否超级管理员（0否 1是）")
    private Boolean isSuperAdmin;

    @Schema(description = "最后登录时间")
    private Long lastLoginTime;

    @Schema(description = "最后登录IP")
    private String lastLoginIp;

    @Schema(description = "登录次数")
    private Integer loginCount;

    @Schema(description = "密码错误次数")
    private Integer passwordErrorCount;

    @Schema(description = "账户锁定到期时间")
    private Long lockExpireTime;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "创建人ID")
    private Long creatorId;

    @Schema(description = "创建人昵称")
    private String creatorName;

    @Schema(description = "状态（0正常 1删除）")
    private Integer status;

    @Schema(description = "创建时间")
    private Long createTime;

    @Schema(description = "更新时间")
    private Long updateTime;
} 